// Copyright (c) 2022 Presto Labs Pte. Ltd.
// Author: jhkim

#include "coin2/strategy/cmm_strat/cmm_factory.h"


namespace coin2::strategy::cmm_strat {

std::unique_ptr<CmmPricer> CreateNewCmmPricer(
      const ::nlohmann::json& arb_config,
      std::optional<int64_t> ts) {
  if (arb_config["pricer_type"] == "CmmTriArbPricer") {

    return std::make_unique<CmmTriArbPricer>(arb_config, ts);

  } else if (arb_config["pricer_type"] == "CmmSelfMidpPricer") {

    return std::make_unique<CmmSelfMidpPricer>(arb_config, ts);

  } else {

    NOTREACHED() << arb_config["pricer_type"];

  }
  return nullptr;
}

}  // namespace coin2::strategy::cmm_strat
